home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / shareware / fractals / fracblank / plot.asm < prev    next >
Assembly Source File  |  1994-11-17  |  1KB  |  71 lines

  1. **
  2. **    FracBlank - AmigaDOS 2.04 commodities utility screenblanker
  3. **
  4. **    Copyright © 1991-1992 by Olaf `Olsen' Barthel
  5. **        All Rights Reserved
  6. **
  7. **    Cosmic flame fractal code derived from xlock source code
  8. **
  9. **    Copyright © 1988-1991 by Patrick J. Naughton.
  10. **
  11.  
  12.     csect    text,0,0,1,2
  13.  
  14.     include    "intuition/intuition.i"
  15.     include    "graphics/rastport.i"
  16.     include    "graphics/gfx.i"
  17.  
  18.     xdef    _MultiPlot
  19.  
  20. _MultiPlot:
  21.     cmp.w    sc_Width(a0),d0
  22.     bcc    quit
  23.  
  24.     cmp.w    sc_Height(a0),d1
  25.     bcc    quit
  26.  
  27.     movem.l    d3/d4,-(sp)
  28.  
  29.     move.l    sc_RastPort+rp_BitMap(a0),a0
  30.     moveq    #0,d4
  31.     move.w    bm_BytesPerRow(a0),d4
  32.     move.b    bm_Depth(a0),d3
  33.     lea.l    bm_Planes(a0),a0
  34.  
  35.     mulu    d4,d1
  36.     move.l    d0,d4
  37.     lsr    #3,d0
  38.     add    d0,d1
  39.     not    d4
  40.     subq    #1,d3
  41.  
  42. loop    move.l    (a0)+,a1
  43.     lsr.b    #1,d2
  44.     bcc    clear
  45.     bset    d4,0(a1,d1)
  46.     dbra    d3,loop
  47.  
  48. exit    movem.l    (sp)+,d3/d4
  49. quit    rts
  50.  
  51. clear    bclr    d4,0(a1,d1)
  52.     dbra    d3,loop
  53.     bra    exit
  54.  
  55.     xdef    _MonoPlot
  56.  
  57. _MonoPlot:
  58.     cmp.w    d3,d0
  59.     bcc    1$
  60.     cmp.w    d4,d1
  61.     bcc    1$
  62.     mulu    d2,d1
  63.     move    d0,d2
  64.     lsr    #3,d0
  65.     add    d0,d1
  66.     not    d2
  67.     bset    d2,0(a0,d1)
  68. 1$    rts
  69.  
  70.     end
  71.